﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management;

namespace Consejo.Monitoring.BusinessObjects
{
    [Serializable]
    public class ServiceStatus : IStatusItem
    {
        private string serviceId = string.Empty;
        private DateTime timeStamp = DateTime.Now.ToUniversalTime();
        private bool serviceResult = false;
        private double duration;

        public string ID
        {
            get { return serviceId; }
            set { serviceId = value; }
        }

        public DateTime TimeStamp
        {
            get { return timeStamp; }
            set { timeStamp = value; }
        }

        public object Result
        {
            get { return (object)serviceResult; }
            set { serviceResult = Convert.ToBoolean(value); }
        }

        public double Duration
        {
            get { return duration; }
            set { duration = value; }
        }

        public ServiceStatus(string _serviceId, DateTime _timeStamp, bool _serviceResult, double _duration)
        {
            serviceId = _serviceId;
            timeStamp = _timeStamp;
            serviceResult = Convert.ToBoolean(_serviceResult);
            duration = _duration;
        }

        public ServiceStatus(string _serviceId,bool _serviceResult, double _duration)
        {

            serviceId = _serviceId;
            serviceResult = Convert.ToBoolean(_serviceResult);
            duration = _duration;
        }

       
    }
}